﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MainForm.aspx.cs" Inherits="ViewStateRemover.MainForm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script type="text/javascript">
        function Test() {
            var hiddenFields = document.getElementById('__VIEWSTATE');

            hiddenFields.value = '';
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox runat="server" id="TextBoxInput"/>
        <asp:Button ID="ButtonSubmit" Text="PostBack" runat="server" OnClientClick='Test()'/>
    </div>
    </form>
</body>
</html>
